package keni.html.android.framework.util;

import java.util.Hashtable;
import java.util.Map;


class ColorsSet
{
	private  Map<IVertex, VertexColor> items = new Hashtable<IVertex, VertexColor>();

	public ColorsSet(IVertex[] items)
	{
		for (IVertex item : items)
		{
			Set(item, VertexColor.White);
		}
	}

	public VertexColor ColorOf(IVertex item)
	{
		if (!items.containsKey(item))
		{
			return VertexColor.NotInThisSet;
		}
		return items.get(item);
	}

	public void Set(IVertex item, VertexColor color)
	{
		items.put(item, color);
	}
}
class TimestampSet
{
	private Map<IVertex, Integer> items = new Hashtable<IVertex, Integer>();

	public void Register(IVertex item, Integer time)
	{
		items.put(item, time);
	}

	public Integer TimeOf(IVertex item)
	{
		return items.get(item);
	}
}
enum VertexColor
{
	NotInThisSet,

	/// <summary>
	///   The node has not been visited yet
	/// </summary>
	White,

	/// <summary>
	///   This node is in the process of being visited
	/// </summary>
	Gray,

	/// <summary>
	///   This now was visited
	/// </summary>
	Black
}